﻿<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>BingoTouch WebApp</title>
    <meta name="viewport" content="user-scalable=no" />
    <link rel="stylesheet" href="common/jquery.mobile-1.1.0.min.css" />
    <link rel="stylesheet" href="common/BingoTouch.css" />
    <script type="text/javascript" src="common/iscroll.js"></script>
    <script type="text/javascript" src="common/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="common/jquery.mobile-1.1.0.min.js"></script>
    <script type="text/javascript" src="common/BingoTouch.js"></script>

    <script type="text/javascript" src="scripts/common.js"></script>

    <script type="text/javascript">
        checkLogin();

        BingoTouch.ready = function () {
            BingoTouch.WebView.wait(true);

            ReqGet(GetActivityList, true, function (activityList) {
                var dom = $('#activityList');
                for (var i = 0; i < activityList.length; i++) {
                    var obj = activityList[i];
                    dom.append("<li><div data-role='BTButton' data-icon='icon-list-right' icon-dir='right' data-url='activity.html' url-arg='" + obj.Id + "'>" + obj.Title + "</div></li>");
                }

                $('#face').attr('src', context_path + (!!currentUser.Face ? currentUser.Face : 'images/NoFace.gif'));

                InitModule();

                BingoTouch.WebView.wait(false);
            });

            $('#btnExit').tap(function () {
                if (BingoTouch.Common.confirm('您确定关闭吗？')) {
                    BingoTouch.App.exit();
                }
            });

            $('#signOut').tap(function () {
                signOut();
            });

            $('#pic').attr('src', context_path + 'pic.jpg');
        };
    </script>
</head>
<body>
<div data-role="page" class="container">
    <!-- 头部 -->
    <div class="header" fixed="top">
        <div class="header-left"><img id="face" style="width:50%" /></div>
        <h2 class="title">最近活动列表</h2>
        <div class="header-right">
            <div class="btn-primary" data-role="BTButton" id="btnExit">关闭</div>
        </div>
    </div>
    <h2></h2>
    <!-- 内容 -->
	<div data-role="content">
    	<div class="content">
        	<div class="content-inner" style="padding-top:100px;">
                <h2>
                <img src="common/images/msg.png" alt="" />游泳协会QQ群：229072939
                </h2>
                <ul class="list-view" id="activityList"></ul>
                <img id="pic" alt="每周一图" alt="pic" />
                <div class="btn-primary btn-large" data-role="BTButton" id="signOut">注销登陆</div>
                <br />
                <br />
            </div>
        </div>
	</div>

    <!-- 底部导航 -->
	<div class="footer" fixed="bottom">			
		<div class="navbar">
			<ul class="grid-d" sonmenu="true" sonmenu-dir="top">
				<li><div data-role="BTButton" class="btn-inverse btn-active" data-icon="demo/statics/images/icon-home.png" icon-dir="top" mouseup="false" data-url="home.html">报名</div></li>
				<li><div data-role="BTButton" class="btn-inverse" data-icon="demo/statics/images/icon-list.png" icon-dir="top" mouseup="false" data-url="finance.html">财务</div></li>
				<li><div data-role="BTButton" class="btn-inverse" data-icon="demo/statics/images/icon-search.png" icon-dir="top" mouseup="false" data-url="account.html">账户</div></li>
				<li><div data-role="BTButton" class="btn-inverse" data-icon="demo/statics/images/icon-setting.png" icon-dir="top" mouseup="false" data-url="contact.html">成员</div></li>
			</ul>
		</div>
	</div>
</div>
</body>
</html>